package com.awenhui.demo.controller;

import com.awenhui.demo.config.Person;
import com.awenhui.demo.core.base.ActionResult;
import com.awenhui.demo.model.PersonDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
import org.springframework.web.bind.annotation.*;

/**
 * @author yuxf
 * @version 1.0
 * @date 2021/3/10 10:49
 */
@Api(description = "资源描述")
@RestController
@RequestMapping("/swagger")
public class SwaggerController {

    @ApiOperation(value = "测试一",notes = "这只是一个测试而已")
    @GetMapping("/test1")
    public ActionResult<PersonDto> test1(@ApiParam(value = "姓名") @RequestParam String name,@RequestBody PersonDto person)
    {
    PersonDto personDto=new PersonDto();
        personDto.setName("于新方");
        return new ActionResult<PersonDto>(0,personDto);
}
}
